using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Resources;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
using KPIS.GERP.Models.Class;

namespace KPIS.GERP.Models.ICM
{
	[DataContract, Table("IcmMasContactPartner")]
    public class MasContactPartner
    {

		[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
		[DataMember, Display(Name = "ConPartId", ResourceType = typeof(Resources.MasContactPartnerResource))]
        public int ConPartId { get; set; }

        [CustomRequired]
		[DataMember, Display(Name = "ConPartName", ResourceType = typeof(Resources.MasContactPartnerResource))]
        public string Name { get; set; }

		[DataMember, Display(Name = "ConPartDescr", ResourceType = typeof(Resources.MasContactPartnerResource))]
        public string Descr { get; set; }

        [ForeignKey("MasContact")]
		[DataMember, Display(Name = "ConId", ResourceType = typeof(Resources.MasContactPartnerResource))]
        public int ConId { get; set; }

        [CustomRequired]
        [CustomStringLength(13)]
		[DataMember, Display(Name = "ConPartCitizen", ResourceType = typeof(Resources.MasContactPartnerResource))]
        public string CitizenId { get; set; }

		[DataMember, Display(Name = "RecordStatus", ResourceType = typeof(Resources.MasContactPartnerResource))]
        public string RecordStatus { get; set; }

		[DataMember, Display(Name = "CreatedBy", ResourceType = typeof(Resources.MasContactPartnerResource))]
        public Nullable<int> CreatedBy { get; set; }

		[DataMember, Display(Name = "CreatedWhen", ResourceType = typeof(Resources.MasContactPartnerResource))]
        public Nullable<System.DateTime> CreatedWhen { get; set; }

		[DataMember, Display(Name = "UpdatedBy", ResourceType = typeof(Resources.MasContactPartnerResource))]
        public Nullable<int> UpdatedBy { get; set; }

		[DataMember, Display(Name = "UpdatedWhen", ResourceType = typeof(Resources.MasContactPartnerResource))]
        public Nullable<System.DateTime> UpdatedWhen { get; set; }


		[DataMember]
        public virtual MasContact MasContact { get; set; }
    }
}